﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using CarFrameWork.Model;

namespace CarFrameWork.UI.ProductDesign._3DModelingDesign.HouQiao
{
    public partial class 加油塞_桥 : PartFormBase
    {
        CarFrameWork.Model.CanShuHua.放油塞_桥 jys_q = new CarFrameWork.Model.CanShuHua.放油塞_桥();//kao
        public 加油塞_桥()
        {
            InitializeComponent();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            
            if (TestContent())
            {
                FormToModel();
                jys_q.Add();
            }
            else
            {
                MessageBox.Show("参数不能为空！","提示");
            }
        }

        private void FormToModel()
        {
            jys_q.ID = 2400008;
            jys_q.name = "加油塞_桥";
            //jys_q.A1 = Convert.ToSingle(textBox1.Text);
            //jys_q.A2 = Convert.ToSingle(textBox2.Text);
            //jys_q.D1 = Convert.ToSingle(textBox3.Text);
            //jys_q.D2 = Convert.ToSingle(textBox4.Text);
            //jys_q.H = Convert.ToSingle(textBox5.Text);
            //jys_q.H1 = Convert.ToSingle(textBox6.Text);
            //jys_q.H2 = Convert.ToSingle(textBox7.Text);
            //jys_q.L1 = Convert.ToSingle(textBox8.Text);
            //jys_q.R1 = Convert.ToSingle(textBox9.Text);
            //jys_q.T = Convert.ToSingle(textBox10.Text);
        }


        private bool TestContent()
        {
            if (!InspectionText(this.textBox1))
                return false;
            if (!InspectionText(this.textBox2))
                return false;
            if (!InspectionText(this.textBox3))
                return false;
            if (!InspectionText(this.textBox4))
                return false;
            if (!InspectionText(this.textBox5))
                return false;
            if (!InspectionText(this.textBox6))
                return false;
            if (!InspectionText(this.textBox7))
                return false;
            if (!InspectionText(this.textBox8))
                return false;
            if (!InspectionText(this.textBox9))
                return false;
            if (!InspectionText(this.textBox10))
                return false;
            return true;
        }
    }
}